/**
 * 👨‍💻 伟谭
 * 📅 2017/11/27
 */

#import "TWConvenienceServiceDetailsOfGroupTitleCollectionReusableView.h"

@interface TWConvenienceServiceDetailsOfGroupTitleCollectionReusableView()

//标题
@property(nonatomic,strong) UILabel *lblTitle;

//更多
@property(nonatomic,strong) UIButton *btnMore;

@end

@implementation TWConvenienceServiceDetailsOfGroupTitleCollectionReusableView

#pragma mark - Class method

#pragma mark - Life cycle

#pragma mark - Override
- (instancetype)initWithFrame:(CGRect)frame {

    if(self){
     
        self = [super initWithFrame:frame];
        self.backgroundColor = [UIColor whiteColor];
        UIImageView *imageVerticalLine = [UIImageView new];
        
        imageVerticalLine.image = [UIImage imageWithColor:[UIColor greenColor] size:CGSizeMake(2.0f, 2.0f)];
        [self addSubview:imageVerticalLine];
        
        
        UILabel *lblTitle = [UILabel hj_labelWithText:@"相册" textColor:nil font:FontB(15.0f)];
        [self addSubview:lblTitle];
        _lblTitle = lblTitle;
        
        
        UIButton *btnMore = [UIButton hj_buttonWithTitle:@"更多" titleColor:[UIColor blackColor] font:FontL(12.0f) touchUpInsideTarget:nil action:nil];
        [btnMore setImage:IMG(@"查看更多") forState:UIControlStateNormal];
        [btnMore layoutButtonWithEdgeInsetsStyle:MKButtonEdgeInsetsStyleRight imageTitleSpace: 8.0f];
        [self addSubview:btnMore];
        _btnMore = btnMore;
        
        
        [imageVerticalLine mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.left.offset(10.0f);
            make.top.offset(6.0f);
            make.bottom.offset(-6.0f);
            make.width.offset(2.0f);
            
            
        }];
        
        [lblTitle mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.left.equalTo(imageVerticalLine.mas_right).offset(4.0f);
            make.centerY.equalTo(imageVerticalLine);
    
        }];
        
        [btnMore mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.offset(-(6.0f + 8.0f));
            make.centerY.offset(0.0f);
        }];
    }
    
    return self;
    
}

#pragma mark - Event response

#pragma mark - Protocol

#pragma mark <<#XXXDelegate#>>

#pragma mark - Public method

#pragma mark - Private method

#pragma mark - Getter & Setter

@end
